<template>
	<view class="main">
		<header-vue :back="true" title="历史反馈"></header-vue>
		<view v-for="item in list" :key="item" class="white-box margin32" @click="goPage(item.id)">
			<view class="font24">{{item.content}}</view>
			<view class="font22">{{item.create_time}}</view>
		</view>
	</view>
</template>

<script>
	import headerVue from '../../components/header.vue';
    import { feedbackList } from '@/api/index.js'
	export default {
		components: {
			headerVue
		},
		data() {
			return {
                list:[],
                page:1,
                limit:10,
            }
		},
        
        onLoad() {
            let data = {
                page:this.page,
                limit:this.limit,
            }
            feedbackList(data).then(res =>{
                console.log(res);
                this.list = res.data.items
            })
        },
		methods: {
			goPage(id) {
                console.log(id);
				uni.navigateTo({
					url:'/views/mine/feedbackDetail?id='+id
				});
			},
		}
	}
</script>

<style lang="scss" scoped>
	.main {
		background: #F6F6F6;
	}

	.margin32 {
		margin: 0 32rpx;
	}

	.white-box {
		background: $uni-bg-color;
		box-shadow: 0rpx 4rpx 20rpx 0rpx rgba(0, 0, 0, 0.1);
		border-radius: 20rpx;
		padding: 24rpx 28rpx;
		box-sizing: border-box;
		margin-top: 28rpx;

		.font24 {
			color: #666666;
		}
		
		.font22 {
			color: #999999;
			margin-top: 16rpx;
			font-size: 22rpx;
		}
	}
</style>